//增加日常任务师傅的视频奖励次数
exports.addSonVideoReward = function (session, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.mission.missionRemote.increaseFriendVideoReward(session, uid, session.frontendId, function (err) {
            if (err) return reject(err);
            resolve();
        });
    });
}

//增加日常任务师爷的视频奖励次数
exports.addGrandSonVideoReward = function (session, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.mission.missionRemote.increaseGrandSonVideoReward(session, uid, session.frontendId, function (err) {
            if (err) return reject(err);
            resolve();
        });
    });
}

//增加日常任务个人的视频奖励
exports.addPersonalVideoReward = function (session, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.mission.missionRemote.increasePersonalVideoReward(session, uid, session.frontendId, function (err) {
            if (err) return reject(err);
            resolve();
        });
    });
}

//完成活动奖励金日常任务
exports.addMoneyVideoReward = function (session, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.mission.missionRemote.increaseMoneyVideoReward(session, uid, session.frontendId, function (err) {
            if (err) return reject(err);
            resolve();
        });
    });
}

//增加用户的总视频次数
exports.addUserTotalVideo = function (session, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.mission.missionRemote.increaseUserTotalVideo(session, uid, session.frontendId, function (err) {
            if (err) return reject(err);
            resolve();
        });
    });
}

//师傅增加有效徒弟奖励
exports.addIncreaseSonReward = function (session, parent_id, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.mission.missionRemote.increaseInviteReward(session, parent_id, uid, session.frontendId, function (err) {
            if (err) return reject(err);
            resolve();
        });
    });
}

//增加用户的有效徒弟数量
exports.addUserValidSon = function (session, parent_id, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.mission.missionRemote.increaseValidSon(session, parent_id, uid, session.frontendId, function (err) {
            if (err) return reject(err);
            resolve();
        });
    });
}

//获取父用户的ID
exports.getParentUid = function (session, uid) {
    return new Promise((resolve, reject) => {
        this.app.rpc.login.loginRemote.getParentParentUid(session, uid, session.frontendId, function (err, parentId) {
            if (err) return reject(err);
            resolve(parentId);
        });
    });
}